#pragma once

#if defined(_WIN32)
#if defined(EXPORTING_Stacktrace)
#define Utility_Stacktrace_DECLSPEC __declspec (dllexport)
#else
#define Utility_Stacktrace_DECLSPEC __declspec (dllimport)
#endif
#else  // non windows
#define Utility_Stacktrace_DECLSPEC
#endif


namespace SG::Utility
{
    /// @brief 处理系统信号的类
    class Utility_Stacktrace_DECLSPEC SGSignal
    {
      public:
        /// @brief 槽函数
        /// @param signum
        static void signalHandler (int signum);

        /// @brief 注册信号
        static void registerSignalHandlers ();

      private:
        SGSignal ()                = default;
        SGSignal (const SGSignal&) = delete;
        SGSignal (SGSignal&&)      = delete;
    };

}  // namespace SG::Utility